import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// const app = createApp();
// app.use(Cascader);
import * as echarts from 'echarts'


import VueQuillEditor from 'vue-quill-editor'

import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
Vue.use(VueQuillEditor)













Vue.config.productionTip = false
// 引入elementui
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

// 引入axios
import axios from 'axios'
// axios挂载原型上
Vue.prototype.$axios = axios

axios.interceptors.request.use(config => {
  console.log(config);
  config.headers.Authorization = window.sessionStorage.getItem('token');
  // 在最后必须return 
  return config
})
Vue.filter('Fil', function (n) {
  let a;
  switch (n * 1) {
    case 0:
      a = '一级';
      break;
    case 1:
      a = '二级';
      break
    case 2:
      a = '三级';
      break;
    default:
      a = '没有要展示的级别';
      break
  }
  return a
})
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
